<?php

namespace app\api\logic;

use app\admin\model\KeyProjects;
use app\common\logic\BaseLogic;

class KeyProjectLogic extends BaseLogic
{
    public static function detail($articleId)
    {
        $article = KeyProjects::with('village')->find($articleId);
        $hits = $article->hits;
        $article->hits = $hits + 1;
        $article->save();
        return $article->toArray();
    }

}